home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / e / mailinglists / amigae.0793july.archive / 000025_crash!minyos.xx….OZ.AU!s924723_Mon, 12 Jul 93 19:45:30 PST.msg < prev    next >
Internet Message Format  |  1994-05-26  |  3KB

  1. Received: by bkhouse.cts.com (V1.16/Amiga)
  2.     id AA00000; Mon, 12 Jul 93 19:45:30 PST
  3. Received: from peladon.rmit.OZ.AU by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #15) id m0oFZKh-0000SmC; Mon, 12 Jul 93 18:39 PDT
  5. Received: from minyos.xx.rmit.OZ.AU by peladon.rmit.OZ.AU with SMTP id AA24687
  6.   (5.65c/IDA-1.4.4 for <amigae@bkhouse.cts.com>); Tue, 13 Jul 1993 11:38:50 +1000
  7. Received: by minyos.xx.rmit.OZ.AU
  8. Message-Id: <9307130139.25470@minyos.xx.rmit.OZ.AU>
  9. Date: Tue, 13 Jul 1993 11:39:03 +1000 (EST)
  10. In-Reply-To: <9307121546.6733@minyos.xx.rmit.OZ.AU> from "Barry D. Wills" at Jul 12, 93 10:43:00 am
  11. X-Mailer: ELM [version 2.4 PL22]
  12. Mime-Version: 1.0
  13. Content-Type: text/plain; charset=US-ASCII
  14. Content-Transfer-Encoding: 7bit
  15. Content-Length: 2569
  16. From: s924723@minyos.xx.rmit.OZ.AU (Son Huu Le)
  17. To: amigae@bkhouse.cts.com
  18. Subject: Re: Optimizing E
  19.  
  20. > Hi, Son Le.  Long time, eh?
  21.  
  22.  (; Working on anything lately, Barry?
  23.  
  24. > >what are the proper arguments for the DOS function SetVBuf()? The DOS
  25. > >manual says it accepts 4 arguments, E only accepts 3!?
  26. > I remember you asking this before.  Don't know, so I didn't answer.
  27.  
  28. I was hoping Wouter could answer this for me. He properly missed the last one.
  29.  
  30. > >I was debugging my programs, I noticed that E always(?) used MOVE.L x(A5),D0
  31. > >for variable storage/retrieval. In a tight loop, a MOVE.L x(AN),D0
  32. > >will cost more cycle time than a MOVE.L D1,D0. Since E doesn't touch the
  33. > >other data registers often, it would help speed time greatly if you could
  34. > >use them.
  35. > Hmmmm.  What debugger do you use?
  36.  
  37. Monam with Devpac. It's great, once you get use to it. (;
  38.  
  39. > I'm interested in the results of replacing:
  40. >   in E...  x++  <->  INC x
  41. >   in C...  x++  <->  x += 1
  42.  
  43. Well, in the first case, E produced the exact code, minus that bogus instr. I
  44. queried.. hmmm.. weird. In the second case.. the same. Did Wouter say that
  45. the new version can output debug symbols?
  46.  
  47. > I recall Wouter saying that ++ returns a value and eats up some ticks in the
  48. > process.  That may be what's going on in that Asm instruction you questioned,
  49. > the value is being returned in D0.  The C compiler sees that you're not doing
  50. > anything with the returned value, so optimizes it away.
  51.  
  52. Sound logical. But E could be much faster if it detected a loop or a low number
  53. of variables, and transfer them all to data registers. Or perhaps a keyword 
  54. that you can use to tell E you want the variable in a register and if there's
  55. a free register, E uses it. A bit more work, but if you're going to produce
  56. efficient and compact codes, it's essential.
  57.  
  58. > >One last suggestion.. how about making some E functions (such as WriteF)
  59. > >more assembling friendly, so you can use certain E functions in the middle
  60. > >of an assembly code? ie. it uses only the upper data/address registers (4-7)
  61. > >and leaves the lower ones intact.
  62. > Wouter told me you can do this:
  63. >     MOVEM D0-D7/A0-A3,(A7)+  ;/* Save multiple regs, post inc stack (SP). */
  64. >     WriteF ('whatever')
  65. >     MOVEM -(A7),D0-D7/A0-A3  ;/* Pre dec stack, restore multiple regs (SP). */
  66. > I'm not at home right now, so I'm not sure about the syntax.  A7 here is the
  67. > program stack pointer (SP).  If you want to correct the syntax and post it to
  68. > the list, I'd appreciate it.
  69.  
  70. Good idea, forgot about it. Still, a bit cumbersome, but it's do.
  71. Btw: The syntax looks pretty much like the correct syntax. (;
  72.  
  73. Cheers..
  74. Son Le